package com.ling.pl.autoproject.definition.component.model;

import com.ling.pl.core.commons.annotation.Dict;
import com.ling.pl.core.commons.annotation.ModelProperty;

import javax.persistence.Column;

/**
 * 对应实体属性搜索项 属性搜索模式 ,正常模式下的控件
 */
public class PropertyController {
    //实体属性搜索表单项信息
    @Column(name = "ENTITY_ID", length = 36)
    @ModelProperty(comment = "实体id")
    String entityId;

    @Column(name = "PROPERTY_ID", length = 36)
    @ModelProperty(comment = "属性id")
    String propertyId;

    @Column(name = "NAME", length = 150)
    @ModelProperty(comment = "名称")
    String name;

    @Column(name = "CODE", length = 150)
    @ModelProperty(comment = "代码")
    String code;

    @Column(name = "CONTROLLER_TYPE", length = 150)
    @ModelProperty(comment = "应用模式")
    @Dict(code = "builder.entity.controllerType", des = "用户自定义,默认模式,移动段默认模式")
    String controllerType;

    @Column(name = "LABEL", length = 150)
    @ModelProperty(comment = "标题")
    String label;

    @Column(name = "LABEL_I18N", length = 150)
    @ModelProperty(comment = "标题i18n")
    String labelI18n;

    @Column(name = "ICON", length = 150)
    @ModelProperty(comment = "输入提示i18n")
    String icon;

    @Column(name = "FORMAT", length = 150)
    @ModelProperty(comment = "格式化")
    String format;

    @Column(name = "DICT_CODE", length = 150)
    @ModelProperty(comment = "系统代码表")
    String dictCode;

    @Column(name = "RULE_ID", length = 36)
    @ModelProperty(comment = "系统值规则", des = "常用正则表打死列表CheckRule")
    String ruleId;

    @Column(name = "EDITOR_TYPE", length = 150)
    @ModelProperty(comment = "编辑器类型")
    @Dict(code = "builder.entity.editorType", des = "文本框.密码框,隐藏表单项,多行输入框,多行输入框(10行),IP地址输入框,直接内容,标签,下拉列表框,下拉列表框(100宽度).选项框," +
            "单选项列表,....见")
    String editorType;

    @Column(name = "EDITOR_STYLE", length = 150)
    @ModelProperty(comment = "编辑器样式")
    @Dict(code = "builder.entity.editorType", des = "精确到分钟,密码框,只有小时分钟,邮箱网址,精确到天,电话号码,精确到小时,数字")
    String editorStyle;

    @Column(name = "VALUE_PROPERTY", length = 150)
    @ModelProperty(comment = "值项名称")
    String valueProperty;

    @Column(name = "IGNORE_INPUT", length = 150)
    @ModelProperty(comment = "忽略输入值")
    @Dict(code = "builder.component.enableRule", des = "无,新建,更新,全部")
    String ignoreInput;

    @Column(name = "BACK_PROCESSOR_ID", length = 150)
    @ModelProperty(comment = "表单项后台处理对象")
    String backProcessorId;

    @Column(name = "EDITOR_PARAM", length = 250)
    @ModelProperty(comment = "编辑器参数")
    String editorParam;

    @Column(name = "IS_DICT_CODE_CONFIG")
    @ModelProperty(comment = "需要提供代码表配置")
    Boolean isDictCodeConfig;

    @Column(name = "DICT_CODE_CONFIG_TYPE", length = 150)
    @ModelProperty(comment = "输出代码表配置模式")
    @Dict(code = "builder.component.dictCodeConfigType", des = "无,只输出选择项,输出子项")
    String dictCodeConfigType;

    @Column(name = "PLACE_HOLDER", length = 150)
    @ModelProperty(comment = "输入提示")
    String placeHolder;

    @Column(name = "PLACE_HOLDER_I18N", length = 150)
    @ModelProperty(comment = "输入提示语言资源")
    String placeHolderI18n;

    //外键文本值约束
    @Column(name = "IS_IGNORE_RELATION_CHECK")
    @ModelProperty(comment = "忽略附加值约束")
    Boolean isIgnoreRelationCheck;

    @Column(name = "IS_IGNORE_RELATION_TEMP_CHECK")
    @ModelProperty(comment = "忽略临时数据关系")
    Boolean isIgnoreRelationTempCheck;

    @Column(name = "IS_RESET_PROPERTY")
    @ModelProperty(comment = "启用重置项名称")
    Boolean isResetProperty;

    @Column(name = "RESET_PROPERTY", length = 150)
    @ModelProperty(comment = "重置项名称")
    String resetProperty;

    @Column(name = "IS_TIP")
    @ModelProperty(comment = "启用输入提示")
    Boolean isTip;

    @Column(name = "TIP", length = 150)
    @ModelProperty(comment = "属性输入提示")
    String tip;

    @Column(name = "IS_UNIT")
    @ModelProperty(comment = "启用输入提示")
    Boolean isUnit;

    @Column(name = "UNIT", length = 150)
    @ModelProperty(comment = "属性输入提示")
    String unit;

    //实体引用配置 关联表和数据集合,配合编辑器类型为数据选择(下拉)就成为了下拉框
    @Column(name = "REL_ENTITY_ID", length = 36)
    @ModelProperty(comment = "关联实体id")
    String relEntityId;

    @Column(name = "REL_SELF_FILL_ID", length = 36)
    @ModelProperty(comment = "关联自填id")
    String relSelfFillId;

    @Column(name = "REL_DATASET_ID", length = 36)
    @ModelProperty(comment = "关联实体数据集合id")
    String relDatasetId;

    @Column(name = "REL_SELECT_VIEW_ID", length = 36)
    @ModelProperty(comment = "关联实体选择视图")
    String relSelectViewId;

    @Column(name = "REL_MULTI_SELECT_VIEW_ID", length = 36)
    @ModelProperty(comment = "关联实体多项选择视图")
    String relMultiSelectViewId;

    @Column(name = "REL_MULTI_SELECT_VIEW_ID", length = 36)
    @ModelProperty(comment = "关联实体链接视图")
    String relLinkSelectViewId;

    @Column(name = "IS_TEMP_DATA")
    @ModelProperty(comment = "启用临时数据")
    Boolean isTempData;

    //建立更新默认值
    @Column(name = "DEFAULT_NEW_VALUE_TYPE", length = 50)
    @ModelProperty(comment = "新建默认值类型")
    @Dict(code = "builder.property.defaultValueType", des = "用户全局对象,系统全局对象,唯一编码,网页请求,数据对象类型,当前操作用户-编号,当前操作用户-名称,当前时间,当前应用数据,当前用户,当前机构,当前部门")
    String defaultNewValueType;

    @Column(name = "DEFAULT_NEW_VALUE", length = 150)
    @ModelProperty(comment = "新建默认值")
    String defaultNewValue;

    @Column(name = "DEFAULT_UPDATE_VALUE_TYPE", length = 50)
    @ModelProperty(comment = "更新默认值类型")
    @Dict(code = "builder.property.defaultValueType", des = "用户全局对象,系统全局对象,唯一编码,网页请求,数据对象类型,当前操作用户-编号,当前操作用户-名称,当前时间,当前应用数据,当前用户,当前机构,当前部门")
    String defaultUpdateValueType;

    @Column(name = "DEFAULT_UPDATE_VALUE", length = 150)
    @ModelProperty(comment = "更新默认值")
    String defaultUpdateValue;

    //数据表格
    @Column(name = "COLUMN_PLUGIN", length = 150)
    @ModelProperty(comment = "表格列绘制插件")
    String columnPlugin;

    @Column(name = "DEFAULT_COLUMN_WIDTH")
    @ModelProperty(comment = "表格列绘制插件")
    Integer defaultColumnWidth;

    @Column(name = "ALIGN", length = 150)
    @ModelProperty(comment = "布局下的垂直对齐方式")
    @Dict(code = "builder.component.align", des = "top middle bottom")
    String align;

}
